package pers.jc.sql;

import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;

public class Help {
	
	public static Map<String, String> getDictionary(Class<?> modelClass) {
		Map<String, String> dictionary = new HashMap<>();
		for (Field field : modelClass.getDeclaredFields()) {
			Description description = field.getAnnotation(Description.class);
			if (description != null) {
				dictionary.put(field.getName(), description.value());
			}
		}
		return dictionary;
	}
}
